package com.wc.算法基础课.A第一讲基础算法.多路归并.谦虚数字;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/3/8 16:50
 * @description https://www.acwing.com/problem/content/1380/
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 100010;
    static int[] a = new int[N], f = new int[N], b = new int[N];
    static int k, n;

    // 每一个丑数，都是又前面的数乘以a[i]来出来的，是不是这个可以存一下这个数乘到哪里上次对待最小值的时候
    public static void main(String[] args) {
        k = sc.nextInt();
        n = sc.nextInt();
        for (int i = 1; i <= k; i++) a[i] = sc.nextInt();
        f[0] = 1;
        for (int i = 1; i <= n; i++) {
            int minV = Integer.MAX_VALUE;
            for (int j = 1; j <= k; j++) {
                // 找到第一个大于最大值的数
                while (a[j] * f[b[j]] <= f[i - 1]) b[j]++;
                minV = Math.min(minV, a[j] * f[b[j]]);
            }
            f[i] = minV;
        }
        out.println(f[n]);
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}